<template>
	<view :class="[primarySize()]">
		<view class="container">
			<view class="pb30 plr30">
				<company-list :companies="companyList"></company-list>
				
				<view class="nothing" v-if="companyListMore.nothing">
					<image src="@/static/public/icon_nothing.png" mode="aspectFit"></image>
					<text>暂无内容</text>
				</view>
				<view class="g-btn3-wrap" v-else>
					<view class="g-btn3" @click="fetchJob()">{{companyListMore.text}}</view>
				</view>
				
			</view>
		</view>
	</view>
</template>

<script>
	const app = getApp();
	import companyList from '../../components/company-list/company-list.vue';
	export default {
		components: {
			companyList
		},
		data() {
			return {
				
				companyList: [],
				companyListMore: {page:1},
			}
		},
		onReady() {
			uni.setNavigationBarColor({
				frontColor: '#ffffff',
				backgroundColor: this.primaryColor()
			})
		},
		/**
		* 生命周期函数--监听页面加载
		*/
		onLoad: function (options) {
			
			this.fetchCompany();
		},
		onReachBottom() {
			this.fetchCompany();
		},
		methods: {
			fetchCompany() {
			    this.$util.fetch(this, 'xilujob.company/look_my', {pagesize: 10}, 'companyListMore', 'companyList', 'data', list=>{
					
			    });
			},
		}
	}
</script>

<style lang="scss" scoped>
.comp_item{
		width: 690rpx;
		background: #FFFFFF;
		box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(0,0,0,0.03);
		border-radius: 18rpx;
		margin-top: 20rpx;
		padding:10rpx 30rpx;
		.cover{
			width: 183rpx;
			height: 195rpx;
		}
		.label{
			padding: 0 8rpx;
			font-size: 22rpx;
			color: #A5A5A5;
			line-height: 32rpx;
			height: 32rpx;
			display: inline-block;
			vertical-align: top;
			margin-top: 20rpx;
			margin-right: 20rpx;
			background: #ECEFF5;
			border-radius: 4rpx;
		}
	}
</style>
